#include <bits/stdc++.h>
using namespace std;
int n;

int main() {
    cin >> n;

    double e = 1;
    for (int i = 1; i <= n; i++) {
        long long sum1 = 1;
        for (int j = 2; j <= i; j++) {
            sum1 *= j;
        }
        e += (double)1 / sum1;
    }

    cout << fixed << setprecision(10) << e;
    return 0;
}